package org.zjz.basket.enums;

/**
 * Desc: 结果状态码枚举
 *
 * @author gezq
 * @since 4/11/2022 - 11:12 PM
 */
public enum ResultStatusEnum {

    /**
     * 成功
     */
    SUCCESS(20000, "SUCCESS"),

    /**
     * 失败
     */
    FAIL(40000, "FAIL"),

    /**
     * 未认证，即token未校验
     */
    UNAUTHORIZED(40001, "UNAUTHORIZED"),

    /**
     * 未授权，即token失效
     */
    FORBIDDEN(40003, "FORBIDDEN"),

    /**
     * 内部服务器错误
     */
    INTERNAL_SERVER_ERROR(50000, "INTERNAL_SERVER_ERROR"),

    ;

    private final Integer code;

    private final String msg;

    ResultStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
